import moment from "moment";

export const useGolbalHook = () => {

    const dateFormat = (value?: any, str?: any) => {
        if (!value) return ''
        str = str || 'YYYY-MM-DD';
        return moment(value).format(str)
    }

    return {
        dateFormat
    }
}